﻿<Page x:Class="Topics.Radical.Samples.Effects.EffectPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d"
	  xmlns:effects="http://schemas.topics.it/wpf/radical/windows/effects"
	  xmlns:local="clr-namespace:Topics.Radical.Samples.Effects"
      d:DesignHeight="238" d:DesignWidth="394"
	Title="EffectPage">
	<Page.DataContext>
		<local:EffectViewModel />
	</Page.DataContext>
	<Page.Resources>
		<effects:GrayscaleEffect x:Key="ge" />
		<Style TargetType="Image">
			<Style.Triggers>
				<Trigger Property="IsEnabled" Value="False">
					<Setter Property="Effect" Value="{StaticResource ResourceKey=ge}" />
				</Trigger>
			</Style.Triggers>
		</Style>
	</Page.Resources>
	<Grid>
		
		<CheckBox IsChecked="{Binding Path=IsChecked}" 
				  Content="Enabled" 
				  Height="16" 
				  HorizontalAlignment="Left" 
				  Margin="98,164,0,0" 
				  VerticalAlignment="Top" />
		<Button IsEnabled="{Binding Path=IsChecked}" Height="23" HorizontalAlignment="Left" Margin="149,69,0,0" Name="button1" VerticalAlignment="Top" Width="75">
			<Button.Content>
				<StackPanel Orientation="Horizontal">
					<Image Stretch="Uniform" Width="32" 
						   Source="/Radical.Samples;component/Samples/Effects/Blender.png" />
					<TextBlock Margin="3" Text="Button" />
				</StackPanel>
			</Button.Content>
		</Button>
	</Grid>
</Page>
